import 'package:base_flutter/base_flutter.dart';
import 'package:saas_order_meal/net/apis.dart';
import 'package:saas_order_meal/net/net_response/customer_account_data.dart';

class CustomerInfoModel extends BaseMvvmModel{
  @override
  void onCleared() {
  }

  ///获取一卡通账户
  Future<CardAccountData> getCardAccount(
      {String physicalCardNo = "", String humanId = ""}) async {
    var map = {"physicalCardNo": physicalCardNo, "humanId": humanId};
    var data = await HttpGo.instance.postData(Apis.checkAccount,
        data: map, options: Options(contentType: Headers.formUrlEncodedContentType));
    if ("0" == data["code"].toString()) {
      return CardAccountData.fromJson(data['data']);
    } else {
      throw data['msg'];
    }
  }

}